<div style="color:#8dc63f;padding:0px 0px 5px 0px;font-size:14px;font-weight:bold;font-family:Arial"> 
    FEATURED PRODUCT
</div>

                            <table width="100%" cellspacing="0" cellpadding="0" id="products" style="border-top:1px solid #DBD2C8">
                                <tr>
                            <?php
                                $allItems = $this->featuredProducts;
                            ?>
                            <?php
                            if (isset($allItems[0])) {
                                $i = 0;
                                $itemPerRow = 4;
                                $widthPercent = 100/$itemPerRow;
                                foreach($allItems as $item):
                                    if ( ($i++ % $itemPerRow == 0) && ($i != 1)) {
                                ?>
                                    </tr>
                                    <tr>
                                <?php
                                    }
                                ?>
                                    <td width="<?php echo $widthPercent?>%">
                                        <div>
                                            <a title="<?php echo htmlspecialchars($item->Product); ?>" class="thumbnail" href="<?php echo BASE_URL ?>/index/shop/detail?pid=<?php echo $item->category_id; ?>&id=<?php echo $item->ProductNo; ?>"><?php echo $item->Product; ?></a>
                                        </div>
                                        <?php
                                        $Thumbnail = $item->Thumbnail;
                                        if ($Thumbnail) {
                                            if (stripos($Thumbnail, 'http') === false) {
                                        $Thumbnail = BASE_PATH . $Thumbnail;
                                    } else {
                                        //echo $image = BASE_PATH . $image;
                                        // do nothing
                                    }
                                        ?>
                                        <div style="padding: 10px 0px">
                                            <a title="<?php echo htmlspecialchars($item->Product); ?>" class="thumbnail" href="<?php echo BASE_URL ?>/index/shop/detail?pid=<?php echo $item->category_id; ?>&id=<?php echo $item->ProductNo; ?>"><img style="max-height: 80px;" alt="<?php echo htmlspecialchars($item->Product); ?>" src="<?php echo htmlspecialchars($Thumbnail)?>"></a>
                                        </div>
                                        <?php
                                        }
                                        if($item->ShowPriceYN  == "Yes")
                                        {
                                            $lineThrough = '';
                                            $salePrice = '';
                                            if ($item->PriceRetail && $item->PriceRetail > 0) {
                                                $lineThrough = ' style="text-decoration: line-through;"';
                                                $salePrice = '<strong style="color:red">$' . $item->PriceRetail . '</strong>';
                                            }
                                        ?>
                                        <div>
                                        Price - <strong <?php echo $lineThrough;?>>$<?php echo $item->Price?></strong>&nbsp; 
                                        <?php echo $salePrice;?>
                                        </div>
                                        <?php } ?>
                                        <div style="padding-bottom:20px">
                                            <a title="<?php echo htmlspecialchars($item->Product); ?>" class="thumbnail" href="<?php echo BASE_URL ?>/index/shop/detail?pid=<?php echo $item->category_id; ?>&id=<?php echo $item->ProductNo; ?>"><img alt="More Info" src="<?php echo JS_PATH?>/skincarebyalana/images/moreInfo.png"/></a>
                                            <?php 
                                            if ($item->Price) { // just show buy button if price enter in admin 
                                                if ($item->AuthReq != "Yes") {
                                                    if($item->AddToCartYN == 'Yes' )
                                                    {
                                                ?>
                                                    
                                                        <img alt="More Info" src="<?php echo JS_PATH?>/skincarebyalana/images/buyit.gif" rel="<?php echo $item->ProductNo; ?>" class="buynow">
                                                    
                                                <?php
                                                }
                                                } // if AuthReq
                                            }
                                            ?>
                                        </div>
                                    </td>
                                <?php
                                endforeach;
                            } // if items
                            ?>
                                </tr>
                            </table>